package com.tongxin.locate;

import com.tongxin.guide.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class SearchActivity extends Activity
{
	public Button btn_search=null;
	public EditText et_search=null;
	
	
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_search);
		
		et_search=(EditText)findViewById(R.id.text_search);
		
		btn_search=(Button)findViewById(R.id.btn_search);
		btn_search.setOnClickListener(new OnClickListener()
		{

			public void onClick(View v)
			{
				Intent intent = new Intent();
				intent.setClass(SearchActivity.this, LocateActivity.class);
				intent.putExtra("place", et_search.getText());
				startActivity(intent);
				SearchActivity.this.finish();
				
			}
			
		});
	}
}
